<template>
  <section>
    <!--start 面包屑-->
    <div class="location">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{path:'/index'}">首页</el-breadcrumb-item>
        <el-breadcrumb-item>设置</el-breadcrumb-item>
        <el-breadcrumb-item :to="{path:'/set/departmentStaff'}">部门与员工</el-breadcrumb-item>
        <el-breadcrumb-item>修改账号</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <!--end 面包屑-->
    <!--start content-->
    <div class="wrap" ref="companyWrap">

      <!--重置密码  start-->
      <div class="height-search">
        <transition name="fade">
          <div class="modal-backdrop" v-show="aReset"></div>
        </transition>
        <transition name="slideDown">
          <div class="height-s-con" v-show="aReset">
            <p class="search-title">重置密码</p>
            <el-form ref="resetFormData" :rules="rules1" :model="resetFormData" label-width="110px">
              <el-form-item label="账号" prop="operatorAccount">
                <el-input class="wInput" v-model="resetFormData.operatorAccount" disabled ></el-input>
              </el-form-item>
              <el-form-item label="新密码" prop="operatorLoginPassword">
                <el-input class="wInput" type="password" v-model="resetFormData.operatorLoginPassword"></el-input>
              </el-form-item>
              <el-form-item label="重复新密码" prop="againPass">
                <el-input class="wInput" type="password" v-model="resetFormData.againPass"></el-input>
              </el-form-item>
              <el-form-item label-width="15px">
                <el-button @click="resetSure" type="primary">确定</el-button>
                <el-button @click="resetCancel">取消</el-button>
              </el-form-item>
            </el-form>

          </div>
        </transition>
      </div>
      <!--重置密码  end-->




      <el-form :model="addNewAccountForm" :rules="rules" ref="addForm" label-width="100px" class="contentWrap formFontSizeMini scroll">
        <el-row :gutter="20">
          <el-col :span="24">
            <div class="title">基础信息</div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="登录账号" prop="operatorAccount">
              <el-input v-model="addNewAccountForm.operatorAccount" disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="2">
          <span class="resetPass" @click="aReset=true">重置密码</span>
          </el-col>
          <el-col :span="2" v-if="false">
          <span class="delPhone" @click="delPhoneBtn">解绑手机</span>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6">
            <el-form-item label="姓名" prop="operatorName">
              <el-input v-model="addNewAccountForm.operatorName" ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="手机" prop="operatorPhone">
              <el-input v-model="addNewAccountForm.operatorPhone" disabled></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="部门" prop="deptmentName">
            	<div class="departmentSelectDiv">
            		<span @click.stop="departmentFn">{{addNewAccountForm.deptmentName}}</span>
            		<i class="el-icon-caret-bottom" :class="{up:treeShow}"></i>
            		<transition name="selectSlide">
	            		<el-tree
	            			v-show="treeShow"
	            			class="departmentTree"
	                  :data="tree"
	                  :props="defaultProps"
	                  node-key="treeCode"
	                  accordion
	                  :expand-on-click-node="false"
	                  @node-click="handleNodeClick">
	                </el-tree>
                </transition>
            	</div>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="职位">
              <el-select class="selectWidth" v-model="addNewAccountForm.operatorPositionName" placeholder="请选择职位">
                <el-option v-for="(item,index) in addNewAccountForm.operatorPosition"  :value="item.ddlistName"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6">
            <el-form-item label="Email" prop="operatorEmail">
              <el-input v-model="addNewAccountForm.operatorEmail" ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="QQ" prop="operatorQq">
              <el-input v-model="addNewAccountForm.operatorQq" ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <div class="title fl">权限设置</div>
            <span class="tips">权限与角色关联，选择该账号的角色可完成权限设置<em class="iconfont">&#xe60d;</em></span>
          </el-col>
        </el-row>



        <el-row :gutter="20" class="powerCheckbox">
          <el-col :span="14">
            <el-form-item label="账号权限" prop="type">
              <el-checkbox-group v-model="addNewAccountForm.type">
                <el-checkbox class="el-checkbox" label="系统管理员" name="type"></el-checkbox>
                <el-checkbox label="业务负责人" name="type"></el-checkbox>
                <el-checkbox label="订单审核员" name="type"></el-checkbox>
                <el-checkbox label="财务审核员" name="type"></el-checkbox>
                <el-checkbox label="发货审核员" name="type"></el-checkbox>
                <el-checkbox label="业务经理" name="type"></el-checkbox>
                <el-checkbox label="仓库管理员" name="type"></el-checkbox>
                <el-checkbox label="资料维护员" name="type"></el-checkbox>
                <el-checkbox label="自定义角色一" name="type"></el-checkbox>
                <el-checkbox label="自定义角色二" name="type"></el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <span class="tipsLeft" >权限明细</span>
          </el-col>
        </el-row>
        <table class="addAccount" cellpadding="0" cellspacing="0">
          <tr>
            <td>订单</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="订单查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单审核" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单修改" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单作废" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单删除" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="财务审核" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="出库审核" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单发货确认" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单退回" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="代下订单" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单审核" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单作废" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单删除" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单确认" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单收货确认" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="退单瑞惠" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="代下退单" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="出库/发货记录" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单商品统计查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单商品统计导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="发货统计查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="发货统计导出" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>商品</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="商品查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品删除" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品类别管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="库存管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="供应商查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="供应商管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="采购订单管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="智能采购" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="采购订单导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品收发存汇总查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="库存成本管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="促销查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="促销管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品分享" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>客户</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="客户查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="客户导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="客户管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="客户删除" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="客户级别设置" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="归属区域设置" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="加盟信息管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="反馈查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="反馈回复" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="反馈删除" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="报价单查看" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>资金</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="收款确认" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="资金账户充值/导入" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="资金账户扣款" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="收款账户管理-在线支付" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="收款账户管理-线下支付" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="收支明细查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="收支明细导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单收款统计查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单收款统计导出" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>通知</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="广告发布管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="通知管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="通知分类管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="短信充值" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="短信发送设置" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>报表</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="订单统计报表导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="地区统计报表导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="商品销售报表导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="客户订货报表导出" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="报表查看" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="利润报表查看" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>设置</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" label="我的账号" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="公司信息" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="系统设置" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="业务流程设置" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="订单审核区域变更" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="部门管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="账号权限管理" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="操作日志" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox"  label="应用中心设置" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>辅助</td>
            <td>
              <el-form-item  prop="type" label="">
                <el-checkbox-group v-model="addNewAccountForm.type">
                  <el-checkbox class="tableCheckbox" disabled label="禁止查看商品价格与订单金额" name="type"></el-checkbox>
                  <el-checkbox class="tableCheckbox" disabled  label="查看商品成本价" name="type"></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
        </table>
        <div class="btnBox">
          <el-button class="footbtn" type="primary" @click="sureAccount">保存</el-button>
          <el-button class="footbtn" @click="cancelAccount">取消</el-button>
        </div>
      </el-form>
    </div>

    <!--end content-->
  </section>
</template>

<script>
  export default {
    data(){
      var phone = (rule, value, callback) => {              //手机号格式验证
        if (!value) {
          return callback(new Error('手机号不能为空'));
        }
        if (/^(13[0-9]|14[57]|15[012356789]|177|18[012356789])\d{8}$/.test(value)!=true) {
            callback(new Error('请输入正确的手机号格式'));
        }else {
            callback();
        }
      };

      var  passInput=(rule, value, callback)=>{
        if (!value) {
          return callback(new Error('密码不能为空'));
        }
        if (!/^[a-zA-Z0-9]{6,20}$/.test(value)) {
          callback(new Error("密码为6-20位字母或数字！"));
        }else {
          callback();
        }
      };

      var againPass=(rule, value, callback)=>{              //再次确认密码
        if (!value) {
          return callback(new Error('确认密码不能为空'));
        }
        if (this.resetFormData.operatorLoginPassword!=value) {
            callback(new Error('两次密码输入必须一致'));
        }else {
            callback();
        }
      };

      var email=(rule, value, callback)=>{              //email验证
        if (value=='') {
            callback();
        }
        if (! /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/.test(value)) {
            callback(new Error('邮箱格式不正确'));
        }else {
            callback();
        }
      };
      var qq=(rule, value, callback)=>{              //qq验证
        if (value=='') {
          callback();
        }
        if (!/^\d{5,15}$/.test(value)) {
            callback(new Error('QQ号格式不正确'));
        }else {
            callback();
        }
      };
      return {
      	treeShow:false,
        addNewAccountForm:{                 //form表单数据
          operatorAccount:'', //登录账号
          operatorName:"",//姓名
          operatorPhone:"",//手机
          deptmentCode:"",//部门Code
          deptmentName:"请选择",//部门Name
          operatorPosition:[],//职位
          operatorPositionName:"",
          operatorEmail:"",//Email
          operatorQq:"",//qq
        },
        rules:{
          operatorName:[{required: true, message: '姓名不能为空', trigger: 'blur'}],
          operatorPhone:[{required: true, validator:phone, trigger: 'blur'}],
          deptmentName:[{required: true, message: '部门不能为空', trigger: 'blur'}],
          operatorEmail:[{validator:email, trigger: 'blur'}],
          operatorQq:[{ validator:qq, trigger: 'blur'}],

        },
        aReset:false,             //重置密码弹出层
        resetFormData:{          //重置密码form数据
          operatorAccount:'',//登录账号
          operatorLoginPassword:'',//新密码
          againPass:'',//重复密码
        },
        rules1:{                 //重置密码form验证
          operatorAccount:[{required: true, message: '账号不能为空', trigger: 'blur'}],
          operatorLoginPassword:[{required: true,validator:passInput, trigger: 'blur'}],
          againPass:[{required: true, validator:againPass, trigger: 'blur'}],
        },
        tree: [],
        defaultProps: {
          children: 'children',
          label: 'treeName'
        },
      }
    },
    methods:{
			setCookie(c_name, value, expiredays){
				var exdate=new Date();
				exdate.setDate(exdate.getDate() + expiredays);
				document.cookie=c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
			},
			getCookie(name){
				var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
				if(arr=document.cookie.match(reg)){
					return unescape(arr[2]);
				}else{
					return null;
				}
			},
			delCookie(name){
				var exp = new Date();
				exp.setTime(exp.getTime() - 1);
				var cval= this.getCookie(name);
				if(cval!=null)
				document.cookie= name + "="+cval+";expires="+exp.toGMTString();
			},
//--------------------新增账号取消   start------------------
      cancelAccount(){
        this.$router.push('/set/departmentStaff');
        this.$refs.addForm.resetFields();
      },

      sureAccount(){
        this.$refs.addForm.validate((valid) => {
          if (valid) {
            this.axios({
							method:"PUT",
							url:"/v3/member/operators/"+this.getCookie("operatorCode"),
							data:{
								"operatorAccount":this.addNewAccountForm.operatorAccount,//登录账号
								"operatorName":this.addNewAccountForm.operatorName,//姓名
								"operatorPhone":this.addNewAccountForm.operatorPhone,//手机
								"deptmentCode":this.addNewAccountForm.deptmentCode,//部门Code
								"operatorPosition":this.addNewAccountForm.operatorPositionName,//职位
								"operatorEmail":this.addNewAccountForm.operatorEmail,//Email
								"operatorQq":this.addNewAccountForm.operatorQq,//qq
							}
						}).then((res)=>{
							this.Public.openSuccess(this,"操作成功！");
							this.$router.go(-1);
						}).catch((error)=>{
							this.Public.openError(this,error.response.data)
						})
          } else {
            return false;
          }
        });
      },
//--------------------重置密码   start----------------------
      resetCancel(){
        this.aReset = false;
        this.$refs.resetFormData.resetFields()
      },
      resetSure(){
				this.$refs.resetFormData.validate((vaild)=>{
					if(vaild){
						this.axios({
							method:"PUT",
							url:"/v3/member/operators/"+this.getCookie("operatorCode"),
							data:{
								"operatorLoginPassword":this.md5(this.resetFormData.operatorLoginPassword).toUpperCase(),
							}
						}).then((res)=>{
							this.Public.openSuccess(this,"操作成功！")
						}).catch((error)=>{
							this.Public.openError(this,error.response.data)
						})
						this.aReset = false;
					}else{

					}
				})
      },

//------------------解绑手机    start-----------------------
      delPhoneBtn(){
        const h = this.$createElement;
        this.$msgbox({
          title: '确认',
          message: h('div', {style: 'padding:20px;'}, [
              h('p',
                {style: 'text-align: center;font-size: 14px;color: #415161;text-align: center;line-height: 25px;margin:0 auto 8px;width:190px'},
                '请确认是否解绑该手机号码？\n解绑后需要管理端重新绑定'
              ),
            ],
          ),
          customClass: "surePay clearfixBox",
          cancelButtonClass:'fr fontSize12',
          confirmButtonClass:'fr fontSize12',
          showCancelButton: true,
          confirmButtonText: '确定',
          cancelButtonText: '取消',
        }).then(action => {
          if (action === 'confirm') {


          }
        });
      },

//--------------------tree的属性   start--------------------
      handleNodeClick(data) {
      	this.addNewAccountForm.deptmentCode = data.treeCode;
        this.addNewAccountForm.deptmentName = data.treeName;
        this.treeShow = false;
      },
      departmentFn(){
      	this.treeShow = !this.treeShow;
      },
       openSuccess(msg) {
        this.$notify({
          message: msg,
          type: 'success',
          duration: 3000
        });
      },
      openError(msg) {
        this.$notify({
          message: msg,
          type: 'error',
          duration: 3000
        });
      },

    },
    mounted(){
      document.querySelector(".contentWrap").style.height = (document.documentElement.clientHeight-180)+'px';

    },
    created(){
    	/* start 请求部门 */
    	this.axios({
				method: 'GET',
				url: "/v3/member/depts/queryTree"
			}).then((res) => {
				this.tree = res.data;
			}).catch((err)=>{
				this.Public.openError(this,err.response.data)
			});
    	/* end 请求部门 */
    	/* start 请求职位 */
    	this.axios({
        method: "POST",
        url: "/v3/basic/ddlists/00100000004/listAll",
        data: {}
      }).then((res) => {
      	this.addNewAccountForm.operatorPosition = res.data.list;
      }).catch((error) => {
        this.Public.openError(this,error.response.data)
      })
    	/* end 请求职位 */
    	/* start 请求页面数据 */
    	this.axios({
    		method:"GET",
    		url:"/v3/member/operators",
    		params:{
    			"operatorCode":this.getCookie("operatorCode"),
    		}
    	}).then((res)=>{
    			this.addNewAccountForm.operatorAccount = res.data.operatorAccount;//登录账号
    			this.resetFormData.operatorAccount = res.data.operatorAccount;//登录账号
    			this.addNewAccountForm.operatorName = res.data.operatorName;//姓名
    			this.addNewAccountForm.operatorPhone = res.data.operatorPhone;//手机
    			this.addNewAccountForm.deptmentName = res.data.deptName;//部门
    			this.addNewAccountForm.operatorPositionName = res.data.operatorPositionStr;//职位
    			this.addNewAccountForm.operatorEmail = res.data.operatorEmail;//Email
    			this.addNewAccountForm.operatorQq = res.data.operatorQq;//qq
    	}).catch((error)=>{
    		//console.log(error.response.status)
    	})
    	/* end 请求页面数据 */
    }


  }
</script>

<style scoped>

  .wInput{
    width: 384px;
  }

  .height-s-con {
    position: absolute;
    width: 100%;
    height: 300px;
    top: 0;
    left: 0;
    padding: 30px;
    z-index: 1005;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 0 10px #ccc;
    overflow: hidden;
  }

  .search-title {
    font-size: 16px;
    border: 0;
    color: #415161;
    margin-bottom: 20px;
  }

  .fade-enter-active, .fade-leave-active {
    transition: .4s;
  }

  .fade-enter, .fade-leave-active {
    opacity: 0;
  }

  .slideDown-enter-active, .slideDown-leave-active {
    transition: .4s;
  }

  .slideDown-enter, .slideDown-leave-active {
	    opacity: 0;
  }

  .resetPass{
  	line-height: 36px;
    text-align: center;
    display: block;
    cursor: pointer;
  }

  .delPhone{
    text-align: center;
    display: block;
    cursor: pointer;
  }


  .tableCheckbox{
    width: 205px;
    margin-right: 0px!important;
    height: 20px!important;
    line-height: 20px!important;
  }

  .addAccount{
    border: 1px solid #e7e9f1;
    margin-top: 8px;
    width: 100%;
  }

  .addAccount tr td {
    padding: 4px 8px;
    border-bottom: 1px solid #e7e9f1;
  }

  .addAccount tr td:first-child{
    width: 100px;
    text-align: center;
    background: #eff1f8;
  }

  .tipsLeft{
    margin-left: 38px;
  }

  .el-checkbox{
    margin-left: 0px!important;
    margin-right: 15px;
  }

  .tips{
    line-height: 25px;
    color: rgb(147, 166, 183);
    margin-left: 10px;
  }
  .tips em{
    font-size: 15px;
    margin-left: 4px;
    cursor: pointer;
    color: rgb(147, 166, 183);
  }

  .tips em:hover{
    color: #f6b55a;
  }

  .passGrand{
    display: inline-block;
    width: 110px;
    height: 20px;
    margin-right: 1px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background-color: #e9ecf3;

  }

  section {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  div.location {
    flex: 0 0 10px;
    padding: 3px 0 15px 0;
  }

  div.wrap {
    position: relative;
    flex: 1;
    width: 100%;
    padding: 15px 20px 0 20px;
    box-sizing: border-box;
    background: #fff;
  }

  .contentWrap{
    overflow-y: auto;
  }

  .scroll {
    overflow-y: auto;
    overflow-x:hidden;
    padding-right: 10px;
  }
  .title {
    height: 50px;
    color: #03B8CC;
    font-size: 16px;
  }
  .selectWidth {
    width: 100%;
  }
  .btnBox {
		bottom: 20px;
		position: absolute;
		width: 87%;
		background: #fff;
		height: 45px;
		line-height: 45px;
		z-index: 10;
  }
  /* start upload */

  .avatar-uploader-icon {
    font-size: 20px;
    color: #8c939d;
    width: 95px;
    height: 95px;
    line-height: 95px;
    text-align: center;
  }
  .avatar {
    width: 95px;
    height: 95px;
    display: block;
  }
  /* end upload */
 /* start 部门下拉的样式 */
.departmentSelectDiv {
	position: relative;
	width: 100%;
	height: 36px;
	line-height: 36px;
}
.departmentSelectDiv>span{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 36px;
	border:1px solid rgb(191, 212, 217);
	border-radius: 4px;
	font-size: 12px;
	padding-left: 10px;
	cursor: pointer;
}
.departmentSelectDiv>span:hover{
	border-color: rgb(131, 156, 165);
}
.departmentSelectDiv>span:active{
	border-color: #03b8cc;
}
.departmentSelectDiv>span:visited{
	border-color: #03b8cc;
}
.departmentSelectDiv>span:focus{
	border-color: #03b8cc;
}
.departmentSelectDiv>i{
	position: absolute;
	top: 0;
	right: 0;
	width: 35px;
	height: 36px;
	line-height: 36px;
	text-align: center;
	color: rgb(191, 212, 217);
	transition: .3s;
	font-size: 12px;
}
.departmentSelectDiv>i.up{
	transform: rotate(180deg);
}
.departmentTree {
	position: absolute;
	width: 100%;
	top: 42px;
	left: 0;
	border-radius: 2px;
	box-shadow:0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04);
	z-index: 2;
	font-size: 12px;
	overflow-y: auto;
	height: 200px;
}
.selectSlide-enter-active, .selectSlide-leave-active {
    transition: .4s;
  }

  .selectSlide-enter, .selectSlide-leave-active {
    height: 0;
    opacity: 0;
  }
 /* end 部门下拉的样式 */
*{
	box-sizing: border-box;
	transition: .2s;
}
</style>
